package com.fosss.band.utils;

import static com.fosss.band.constant.UserRole.*;

/**
 * @author: fosss
 * Date: 2024/1/9
 * Time: 12:00
 * Description: 获取用户角色
 */
public class RoleUtil {
    public static String[] getRole(int roleCode) {
        String[] roles = new String[1];
        if (roleCode == ADMIN_CODE) {
            roles[0] = ADMIN;
        } else if (roleCode == BAND_CODE) {
            roles[0] = BAND;
        } else {
            roles[0] = USER;
        }
        return roles;
    }
}
